/*
 * @Author: Qimu
 * @Date: 2020-04-17 08:36:48
 * @LastEditors: Qimu
 * @LastEditTime: 2020-06-29 18:57:45
 * @Description: file content
 * @FilePath: \vue-admin-koa2\koa2_api\module\schama\article.js
 */
const mongoose = require('../db/mongodb');
const config = require('../config/config');

const categorySchema = mongoose.Schema({
  category_name: { //文章分类分类名称
    type: String,
    required: true,
    trim: true
  },
  category_sketch: { //文章分类简述
    type: String,
    required: true,
    trim: true
  },
  category_status: { //文章分类状态
    type: Number,
    default: 1
  },
  category_createTime: { //文章分类创建时间
    type: String,
    required: true,
    trim: true,
  },
  category_updateTime: { //文章分类更新时间
    type: String,
    required: true,
    trim: true,
  },
})

module.exports = Category = mongoose.model('Category', categorySchema, `${config.mongodb.table}category`);